﻿using System;
using System.Collections.Generic;
using Meqs.Entity;

namespace Meqs.Logic.Interface
{
    public interface IStuCauseEvalTypeLogic : ICommonLogic<StuCauseEvalType, int>
    {
        /// <summary>
        /// 验证类型是否被使用
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <param name="historyId"></param>
        /// <param name="causeId"></param>
        /// <param name="typeName"></param>
        /// <returns>0-未使用，大于0-被使用</returns>
        int ValidateTypeName(string schoolMark, int historyId, int causeId, string typeName);

        /// <summary>
        /// 添加类型，包含自增序号信息
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <param name="historyId"></param>
        /// <param name="causeId"></param>
        /// <param name="typeName"></param>
        /// <returns></returns>
        int InsertType(string schoolMark, int historyId, int causeId, string typeName);

        /// <summary>
        /// 添加history，添加类型，包含自增序号信息
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <param name="causeId"></param>
        /// <param name="typeName"></param>
        /// <param name="schoolYear"></param>
        /// <param name="term"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        int InsertTypeHistory(string schoolMark, int causeId, string typeName, int schoolYear, int term, int userId);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <param name="typeId"></param>
        /// <returns></returns>
        int DeleteById(string schoolMark, int historyId, int typeId, int schoolYear, int term);


        /// <summary>
        /// 更改类型名
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <param name="typeName"></param>
        /// <param name="typeId"></param>
        /// <returns></returns>
        int UpdateTypeName(string schoolMark, string typeName, int typeId);



        #region Modify By　YuBing

        /// <summary>
        /// 获取所有德育评价大类(小类无大类的算做大类)
        /// </summary>
        /// <param name="causeID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<StuCauseEvalType> GetAllStuCauseEvalType(int causeID, string schoolMark);

        /// <summary>
        /// 获取所有德育评价大类(小类无大类的算做大类)
        /// </summary>
        /// <param name="causeID"></param>
        /// <param name="schoolMark"></param>
        /// <param name="schoolYear"></param>
        /// <param name="term"></param>
        /// <returns></returns>
        IList<StuCauseEvalType> GetAllStuCauseEvalType(int causeID, string schoolMark, int schoolYear, int term);

        #endregion
    }
}